#ifndef TIMELCDNUMBERVIEW_H
#define TIMELCDNUMBERVIEW_H

#include "viewobject.h"
#include "paramobject.h"
#include <QLabel>
#include <QMovie>
#include <qdom.h>
#include <QTimer>
#include <QLCDNumber>

typedef struct TimeLcdParam
{
    QString     m_timeFormat;
    QString     m_timeStyle;
    TimeLcdParam()
    {
        m_timeFormat = "";
        m_timeStyle = "";
    }
}TimeLcdParam;

typedef struct TimeLcdViewParam
{
    TimeLcdParam       m_time;
}TimeLcdViewParam;


class  TimeLcdView:public ViewObject
{
    Q_OBJECT
public:
    static int m_id;
    Q_INVOKABLE explicit TimeLcdView(QWidget *parent = 0);
    ~TimeLcdView();

    void ShowObject(QWidget*, QString prefix = "", ProtocolData * ptr_data = NULL);

    void HideObject();

    void DestoryObject();

    void GetAttribute(std::string&);

    void SetAttribute(std::string);

    void ParseXML(QDomElement* );

    void PacketXML(QDomElement*);

public slots:
    void TimeOutSlot();
private:
    QTimer*                             m_timer;
    QLCDNumber*                         m_labelTime;
    QString                             m_timeStr;
    TimeLcdViewParam*                   m_timeViewParam;
};
#endif // TIMELCDNUMBERVIEWOBJECT_H
